<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.Canvas类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_canvas.html">Canvas</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_canvas-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.Canvas类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a43abbbea9d3c3dae21d27587de051548"><td class="memItemLeft" align="right" valign="top"><a id="a43abbbea9d3c3dae21d27587de051548"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Canvas</b> (long nativeObj)</td></tr>
<tr class="separator:a43abbbea9d3c3dae21d27587de051548"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada11aeaebbb34cca561094db686d59cd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#ada11aeaebbb34cca561094db686d59cd">getWidth</a> ()</td></tr>
<tr class="separator:ada11aeaebbb34cca561094db686d59cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a714ed4b537609b6940d7a3a4f9d72af4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a714ed4b537609b6940d7a3a4f9d72af4">getHeight</a> ()</td></tr>
<tr class="separator:a714ed4b537609b6940d7a3a4f9d72af4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01b96c59c248706e46ed2c883c371d37"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a01b96c59c248706e46ed2c883c371d37">getClipRect</a> (<a class="el" href="classawtk_1_1_rect.html">Rect</a> r)</td></tr>
<tr class="separator:a01b96c59c248706e46ed2c883c371d37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a619b8e0824d9b584beccfbd75709dc7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a619b8e0824d9b584beccfbd75709dc7c">setClipRect</a> (<a class="el" href="classawtk_1_1_rect.html">Rect</a> r)</td></tr>
<tr class="separator:a619b8e0824d9b584beccfbd75709dc7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7250e81cad1bf7323a0fc0612aa7d96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#ae7250e81cad1bf7323a0fc0612aa7d96">setClipRectEx</a> (<a class="el" href="classawtk_1_1_rect.html">Rect</a> r, boolean <a class="el" href="classawtk_1_1_canvas.html#a861414d5d27ae336dc9275e6c8df97e9">translate</a>)</td></tr>
<tr class="separator:ae7250e81cad1bf7323a0fc0612aa7d96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5377500b7ba2a564be9e65e605f1f864"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a5377500b7ba2a564be9e65e605f1f864">setFillColor</a> (String color)</td></tr>
<tr class="separator:a5377500b7ba2a564be9e65e605f1f864"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a278c147dd6873c4bd4f9457dc934412d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a278c147dd6873c4bd4f9457dc934412d">setTextColor</a> (String color)</td></tr>
<tr class="separator:a278c147dd6873c4bd4f9457dc934412d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9f9d5e8226506693cb0587c2ce19cb2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#ac9f9d5e8226506693cb0587c2ce19cb2">setStrokeColor</a> (String color)</td></tr>
<tr class="separator:ac9f9d5e8226506693cb0587c2ce19cb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa24f1ef21cf27943d2ca3bdd3352d15d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#aa24f1ef21cf27943d2ca3bdd3352d15d">setGlobalAlpha</a> (int alpha)</td></tr>
<tr class="separator:aa24f1ef21cf27943d2ca3bdd3352d15d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a861414d5d27ae336dc9275e6c8df97e9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a861414d5d27ae336dc9275e6c8df97e9">translate</a> (int dx, int dy)</td></tr>
<tr class="separator:a861414d5d27ae336dc9275e6c8df97e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31c3dab32a23059685c340ea8c3e4a49"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a31c3dab32a23059685c340ea8c3e4a49">untranslate</a> (int dx, int dy)</td></tr>
<tr class="separator:a31c3dab32a23059685c340ea8c3e4a49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c1867cfb894913cc8b1c1459ca94d31"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a7c1867cfb894913cc8b1c1459ca94d31">drawVline</a> (int x, int y, int h)</td></tr>
<tr class="separator:a7c1867cfb894913cc8b1c1459ca94d31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa75738fefe331dbae04aa5b1093cf005"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#aa75738fefe331dbae04aa5b1093cf005">drawHline</a> (int x, int y, int w)</td></tr>
<tr class="separator:aa75738fefe331dbae04aa5b1093cf005"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9d21f60f2ebedb00c095221da53f3da"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#ae9d21f60f2ebedb00c095221da53f3da">fillRect</a> (int x, int y, int w, int h)</td></tr>
<tr class="separator:ae9d21f60f2ebedb00c095221da53f3da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a440a479bc1a35ba48f847729434548"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a7a440a479bc1a35ba48f847729434548">strokeRect</a> (int x, int y, int w, int h)</td></tr>
<tr class="separator:a7a440a479bc1a35ba48f847729434548"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac25003d65846bef049e9fd4576c350a5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#ac25003d65846bef049e9fd4576c350a5">setFont</a> (String name, int size)</td></tr>
<tr class="separator:ac25003d65846bef049e9fd4576c350a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a350a945a7e4cc64283d2f740fe0ad96a"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a350a945a7e4cc64283d2f740fe0ad96a">measureText</a> (String str)</td></tr>
<tr class="separator:a350a945a7e4cc64283d2f740fe0ad96a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff4f9c107698c08c107681756d67a17c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#aff4f9c107698c08c107681756d67a17c">drawText</a> (String str, int x, int y)</td></tr>
<tr class="separator:aff4f9c107698c08c107681756d67a17c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa120945feb2f04173d5bfcd8421a5c5c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#aa120945feb2f04173d5bfcd8421a5c5c">drawTextInRect</a> (String str, <a class="el" href="classawtk_1_1_rect.html">Rect</a> r)</td></tr>
<tr class="separator:aa120945feb2f04173d5bfcd8421a5c5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b0505dc32620e933624c74880a6aed8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a8b0505dc32620e933624c74880a6aed8">drawIcon</a> (<a class="el" href="classawtk_1_1_bitmap.html">Bitmap</a> img, int cx, int cy)</td></tr>
<tr class="separator:a8b0505dc32620e933624c74880a6aed8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83480c4f0483a519419914d29cdb7370"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a83480c4f0483a519419914d29cdb7370">drawImage</a> (<a class="el" href="classawtk_1_1_bitmap.html">Bitmap</a> img, <a class="el" href="classawtk_1_1_rect.html">Rect</a> src, <a class="el" href="classawtk_1_1_rect.html">Rect</a> dst)</td></tr>
<tr class="separator:a83480c4f0483a519419914d29cdb7370"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a066d1805c3e50b018fbfdd993ce73e86"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a066d1805c3e50b018fbfdd993ce73e86">drawImageEx</a> (<a class="el" href="classawtk_1_1_bitmap.html">Bitmap</a> img, <a class="el" href="enumawtk_1_1_image_draw_type.html">ImageDrawType</a> draw_type, <a class="el" href="classawtk_1_1_rect.html">Rect</a> dst)</td></tr>
<tr class="separator:a066d1805c3e50b018fbfdd993ce73e86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab08604ef01e232ae2fd971dfcd81d04d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classawtk_1_1_vgcanvas.html">Vgcanvas</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#ab08604ef01e232ae2fd971dfcd81d04d">getVgcanvas</a> ()</td></tr>
<tr class="separator:ab08604ef01e232ae2fd971dfcd81d04d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73dbc71304d5e6a78c02b1452955078c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a73dbc71304d5e6a78c02b1452955078c">reset</a> ()</td></tr>
<tr class="separator:a73dbc71304d5e6a78c02b1452955078c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a660e28e76de8a26fe79f131f265c03ae"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a660e28e76de8a26fe79f131f265c03ae">getOx</a> ()</td></tr>
<tr class="separator:a660e28e76de8a26fe79f131f265c03ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf49ea551df9fd1e86226e0c81eb5955"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#acf49ea551df9fd1e86226e0c81eb5955">getOy</a> ()</td></tr>
<tr class="separator:acf49ea551df9fd1e86226e0c81eb5955"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d9e1715a38e4b883cb3045e52ec5e93"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a7d9e1715a38e4b883cb3045e52ec5e93">getFontName</a> ()</td></tr>
<tr class="separator:a7d9e1715a38e4b883cb3045e52ec5e93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5ccdc15311610b0cc066fc4f56e57bc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#ae5ccdc15311610b0cc066fc4f56e57bc">getFontSize</a> ()</td></tr>
<tr class="separator:ae5ccdc15311610b0cc066fc4f56e57bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3da4e85c172908bebe98d3da165da672"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a3da4e85c172908bebe98d3da165da672">getGlobalAlpha</a> ()</td></tr>
<tr class="separator:a3da4e85c172908bebe98d3da165da672"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a2d8e4d22f531694510d106d6c7c7b01e"><td class="memItemLeft" align="right" valign="top"><a id="a2d8e4d22f531694510d106d6c7c7b01e"></a>
static <a class="el" href="classawtk_1_1_canvas.html">Canvas</a>&#160;</td><td class="memItemRight" valign="bottom"><b>cast</b> (long nativeObj)</td></tr>
<tr class="separator:a2d8e4d22f531694510d106d6c7c7b01e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8526bd0e4c294b88db108f96ec298b19"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_canvas.html">Canvas</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_canvas.html#a8526bd0e4c294b88db108f96ec298b19">cast</a> (<a class="el" href="classawtk_1_1_canvas.html">Canvas</a> c)</td></tr>
<tr class="separator:a8526bd0e4c294b88db108f96ec298b19"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a1c3a829c933f488aae293d9aa67b5e2f"><td class="memItemLeft" align="right" valign="top"><a id="a1c3a829c933f488aae293d9aa67b5e2f"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:a1c3a829c933f488aae293d9aa67b5e2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>提供基本的绘图功能和状态管理。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a8526bd0e4c294b88db108f96ec298b19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8526bd0e4c294b88db108f96ec298b19">&#9670;&nbsp;</a></span>cast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_canvas.html">Canvas</a> awtk.Canvas.cast </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_canvas.html">Canvas</a>&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换为canvas对象(供脚本语言使用)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>canvas对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>canvas对象。 </dd></dl>

</div>
</div>
<a id="aa75738fefe331dbae04aa5b1093cf005"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa75738fefe331dbae04aa5b1093cf005">&#9670;&nbsp;</a></span>drawHline()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.drawHline </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>画水平线。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">w</td><td>宽度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a8b0505dc32620e933624c74880a6aed8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b0505dc32620e933624c74880a6aed8">&#9670;&nbsp;</a></span>drawIcon()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.drawIcon </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_bitmap.html">Bitmap</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>绘制图标。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>图片对象。 </td></tr>
    <tr><td class="paramname">cx</td><td>中心点x坐标。 </td></tr>
    <tr><td class="paramname">cy</td><td>中心点y坐标。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a83480c4f0483a519419914d29cdb7370"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83480c4f0483a519419914d29cdb7370">&#9670;&nbsp;</a></span>drawImage()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.drawImage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_bitmap.html">Bitmap</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_rect.html">Rect</a>&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_rect.html">Rect</a>&#160;</td>
          <td class="paramname"><em>dst</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>绘制图片。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>图片对象。 </td></tr>
    <tr><td class="paramname">src</td><td>源区域。 </td></tr>
    <tr><td class="paramname">dst</td><td>目的区域。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a066d1805c3e50b018fbfdd993ce73e86"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a066d1805c3e50b018fbfdd993ce73e86">&#9670;&nbsp;</a></span>drawImageEx()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.drawImageEx </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_bitmap.html">Bitmap</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="enumawtk_1_1_image_draw_type.html">ImageDrawType</a>&#160;</td>
          <td class="paramname"><em>draw_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_rect.html">Rect</a>&#160;</td>
          <td class="paramname"><em>dst</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>绘制图片。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>图片对象。 </td></tr>
    <tr><td class="paramname">draw_type</td><td>绘制类型。 </td></tr>
    <tr><td class="paramname">dst</td><td>目的区域。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aff4f9c107698c08c107681756d67a17c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff4f9c107698c08c107681756d67a17c">&#9670;&nbsp;</a></span>drawText()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.drawText </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>绘制文本。</p>
<p>供脚本语言使用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>字符串。 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aa120945feb2f04173d5bfcd8421a5c5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa120945feb2f04173d5bfcd8421a5c5c">&#9670;&nbsp;</a></span>drawTextInRect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.drawTextInRect </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_rect.html">Rect</a>&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>绘制文本。</p>
<p>供脚本语言使用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>字符串。 </td></tr>
    <tr><td class="paramname">r</td><td>矩形区域。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a7c1867cfb894913cc8b1c1459ca94d31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c1867cfb894913cc8b1c1459ca94d31">&#9670;&nbsp;</a></span>drawVline()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.drawVline </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>画垂直线。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">h</td><td>高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ae9d21f60f2ebedb00c095221da53f3da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9d21f60f2ebedb00c095221da53f3da">&#9670;&nbsp;</a></span>fillRect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.fillRect </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>填充矩形。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">w</td><td>宽度。 </td></tr>
    <tr><td class="paramname">h</td><td>高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a01b96c59c248706e46ed2c883c371d37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01b96c59c248706e46ed2c883c371d37">&#9670;&nbsp;</a></span>getClipRect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.getClipRect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_rect.html">Rect</a>&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取裁剪区。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>rect对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a7d9e1715a38e4b883cb3045e52ec5e93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d9e1715a38e4b883cb3045e52ec5e93">&#9670;&nbsp;</a></span>getFontName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.Canvas.getFontName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>当前字体名称。 </p>

</div>
</div>
<a id="ae5ccdc15311610b0cc066fc4f56e57bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5ccdc15311610b0cc066fc4f56e57bc">&#9670;&nbsp;</a></span>getFontSize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Canvas.getFontSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>当前字体大小。 </p>

</div>
</div>
<a id="a3da4e85c172908bebe98d3da165da672"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3da4e85c172908bebe98d3da165da672">&#9670;&nbsp;</a></span>getGlobalAlpha()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Canvas.getGlobalAlpha </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>当前全局alpha。 </p>

</div>
</div>
<a id="a714ed4b537609b6940d7a3a4f9d72af4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a714ed4b537609b6940d7a3a4f9d72af4">&#9670;&nbsp;</a></span>getHeight()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Canvas.getHeight </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取画布的高度。</p>
<dl class="section return"><dt>返回</dt><dd>返回画布的高度。 </dd></dl>

</div>
</div>
<a id="a660e28e76de8a26fe79f131f265c03ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a660e28e76de8a26fe79f131f265c03ae">&#9670;&nbsp;</a></span>getOx()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Canvas.getOx </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>x坐标偏移。 </p>

</div>
</div>
<a id="acf49ea551df9fd1e86226e0c81eb5955"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf49ea551df9fd1e86226e0c81eb5955">&#9670;&nbsp;</a></span>getOy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Canvas.getOy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>y坐标偏移。 </p>

</div>
</div>
<a id="ab08604ef01e232ae2fd971dfcd81d04d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab08604ef01e232ae2fd971dfcd81d04d">&#9670;&nbsp;</a></span>getVgcanvas()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classawtk_1_1_vgcanvas.html">Vgcanvas</a> awtk.Canvas.getVgcanvas </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取vgcanvas对象。</p>
<dl class="section return"><dt>返回</dt><dd>返回vgcanvas对象。 </dd></dl>

</div>
</div>
<a id="ada11aeaebbb34cca561094db686d59cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada11aeaebbb34cca561094db686d59cd">&#9670;&nbsp;</a></span>getWidth()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Canvas.getWidth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取画布的宽度。</p>
<dl class="section return"><dt>返回</dt><dd>返回画布的宽度。 </dd></dl>

</div>
</div>
<a id="a350a945a7e4cc64283d2f740fe0ad96a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a350a945a7e4cc64283d2f740fe0ad96a">&#9670;&nbsp;</a></span>measureText()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double awtk.Canvas.measureText </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>计算文本所占的宽度。</p>
<p>供脚本语言使用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>字符串。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回文本所占的宽度。 </dd></dl>

</div>
</div>
<a id="a73dbc71304d5e6a78c02b1452955078c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73dbc71304d5e6a78c02b1452955078c">&#9670;&nbsp;</a></span>reset()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>释放相关资源。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a619b8e0824d9b584beccfbd75709dc7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a619b8e0824d9b584beccfbd75709dc7c">&#9670;&nbsp;</a></span>setClipRect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.setClipRect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_rect.html">Rect</a>&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置裁剪区。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>rect对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ae7250e81cad1bf7323a0fc0612aa7d96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7250e81cad1bf7323a0fc0612aa7d96">&#9670;&nbsp;</a></span>setClipRectEx()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.setClipRectEx </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_rect.html">Rect</a>&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>translate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置裁剪区。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>rect对象。 </td></tr>
    <tr><td class="paramname">translate</td><td>是否将裁剪区的位置加上canvas当前的偏移。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a5377500b7ba2a564be9e65e605f1f864"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5377500b7ba2a564be9e65e605f1f864">&#9670;&nbsp;</a></span>setFillColor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.setFillColor </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置填充颜色。</p>
<p>供脚本语言使用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>颜色。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ac25003d65846bef049e9fd4576c350a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac25003d65846bef049e9fd4576c350a5">&#9670;&nbsp;</a></span>setFont()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.setFont </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置字体。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>字体名称。 </td></tr>
    <tr><td class="paramname">size</td><td>字体大小。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aa24f1ef21cf27943d2ca3bdd3352d15d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa24f1ef21cf27943d2ca3bdd3352d15d">&#9670;&nbsp;</a></span>setGlobalAlpha()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.setGlobalAlpha </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>alpha</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置全局alpha值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">alpha</td><td>alpha值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ac9f9d5e8226506693cb0587c2ce19cb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9f9d5e8226506693cb0587c2ce19cb2">&#9670;&nbsp;</a></span>setStrokeColor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.setStrokeColor </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置线条颜色。</p>
<p>供脚本语言使用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>颜色。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a278c147dd6873c4bd4f9457dc934412d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a278c147dd6873c4bd4f9457dc934412d">&#9670;&nbsp;</a></span>setTextColor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.setTextColor </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置文本颜色。</p>
<p>供脚本语言使用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>颜色。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a7a440a479bc1a35ba48f847729434548"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a440a479bc1a35ba48f847729434548">&#9670;&nbsp;</a></span>strokeRect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.strokeRect </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>绘制矩形。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">w</td><td>宽度。 </td></tr>
    <tr><td class="paramname">h</td><td>高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a861414d5d27ae336dc9275e6c8df97e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a861414d5d27ae336dc9275e6c8df97e9">&#9670;&nbsp;</a></span>translate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.translate </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>平移原点坐标。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">dx</td><td>x偏移。 </td></tr>
    <tr><td class="paramname">dy</td><td>y偏移。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a31c3dab32a23059685c340ea8c3e4a49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31c3dab32a23059685c340ea8c3e4a49">&#9670;&nbsp;</a></span>untranslate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Canvas.untranslate </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>反向平移原点坐标。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">dx</td><td>x偏移。 </td></tr>
    <tr><td class="paramname">dy</td><td>y偏移。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/Canvas.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
